import request from '@/utils/request'

// 查询原料仓库列表
export function listMaterial(query) {
  return request({
    url: '/sales/material/list',
    method: 'get',
    params: query
  })
}

// 查询原料仓库详细
export function getMaterial(materialId) {
  return request({
    url: '/sales/material/' + materialId,
    method: 'get'
  })
}

// 新增原料仓库
export function addMaterial(data) {
  return request({
    url: '/sales/material',
    method: 'post',
    data: data
  })
}

// 修改原料仓库
export function updateMaterial(data) {
  return request({
    url: '/sales/material',
    method: 'put',
    data: data
  })
}

// 删除原料仓库
export function delMaterial(materialId) {
  return request({
    url: '/sales/material/' + materialId,
    method: 'delete'
  })
}

// 查询仓库列表
export function storeListSelect() {
  return request({
    url: '/sales/material/storeList',
    method: 'get'
  })
}
